import request from '@/utils/request'

// 查询年检管理列表
export function listInspection(query) {
  return request({
    url: '/maintenance/inspection/list',
    method: 'get',
    params: query
  })
}

// 查询年检管理列表
export function listInspectionAll(query) {
  return request({
    url: '/maintenance/inspection/listByCarNo',
    method: 'get',
    params: query
  })
}

// 查询年检管理详细
export function getInspection(id) {
  return request({
    url: '/maintenance/inspection/' + id,
    method: 'get'
  })
}

// 查询年检管理详细
export function getInfoById(id) {
  return request({
    url: '/maintenance/inspection/getInfoById/' + id,
    method: 'get'
  })
}

// 查询年检管理详细
export function getCarInfo(id) {
  return request({
    url: '/maintenance/inspection/getCarInfo/' + id,
    method: 'get'
  })
}

// 新增年检管理
export function addInspection(data) {
  return request({
    url: '/maintenance/inspection',
    method: 'post',
    data: data
  })
}

// 修改年检管理
export function updateInspection(data) {
  return request({
    url: '/maintenance/inspection',
    method: 'put',
    data: data
  })
}

// 删除年检管理
export function delInspection(id) {
  return request({
    url: '/maintenance/inspection/' + id,
    method: 'delete'
  })
}

// 导出年检管理
export function exportInspection(query) {
  return request({
    url: '/maintenance/inspection/export',
    method: 'get',
    params: query
  })
}

// 下载导入模板
export function importTemplate() {
  return request({
    url: '/maintenance/inspection/importTemplate',
    method: 'get'
  })
}
// 下载年检管理模板
export function downloadTemplate(query) {
  return request({
    url: '/maintenance/inspection/downloadTemplate',
    method: 'get',
	params: query
  })
}
